#ifndef HOMEPAGE_H
#define HOMEPAGE_H

#include <QWidget>
#include <QPixmap>

#include "ui_homepage.h"
#include "setwig.h"
#include "stm32wig.h"
#include "homewig.h"
#include "mjpg.h"
#include "handoff.h"

namespace Ui {
class HomePage;
}

class HomePage : public QWidget
{
    Q_OBJECT

public:
    explicit HomePage(QWidget *parent = nullptr);  // 使用 nullptr 替代 0
    ~HomePage();

    void initSence();

protected:
    void paintEvent(QPaintEvent *event) override;  // 将 paintEvent 放在 protected 中

private slots:
    void on_pushButton_clicked();  // 使用 Q_SLOT 宏标记为槽函数

private:
    Ui::HomePage *ui;
    Stm32Wig* stm32Wig;
    SetWig *setWig;
    homewig *hw;

    QPixmap m_Background;  // 成员变量
};

#endif // HOMEPAGE_H
